package fhv.at.imageprocessing.viewImage;

import java.beans.EventSetDescriptor;
import java.beans.MethodDescriptor;
import java.beans.ParameterDescriptor;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
import java.lang.reflect.Method;

import fhv.at.imageprocessing.ImageChangedEvent;

public class ViewImageBeanInfo extends SimpleBeanInfo {
	@Override
	public PropertyDescriptor[] getPropertyDescriptors() {
		PropertyDescriptor pds[] = {};
		return pds;
	}

	@Override
	public EventSetDescriptor[] getEventSetDescriptors() {
		EventSetDescriptor esd[] = {};
		return esd;
	}

	@Override
	public MethodDescriptor[] getMethodDescriptors() {
		// MethodDescriptor mds[] = {};
		// return mds;
		try {
			Class c = ViewImage.class;
			Class parameterTypes[] = new Class[1];
			parameterTypes[0] = ImageChangedEvent.class;
			String name = "imageValueChanged";
			Method method1 = c.getMethod(name, parameterTypes);
			ParameterDescriptor pds[] = new ParameterDescriptor[1];
			pds[0] = new ParameterDescriptor();
			MethodDescriptor md1 = new MethodDescriptor(method1, pds);
			MethodDescriptor mds[] = { md1 };
			return mds;
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return null;
	}

}
